#include "test.h"

int main(int argc,char const *argv[])
{   
    FILE *fp = fopen ("来了老弟.txt","r+");
    for (size_t i = 0; i < 6; i++)
    {
        fprintf(fp,"学号:%d\t成绩:%d\n",ux[i].id ,ux[i].sco);
    }
    fclose (fp);
    char ch =0;
    char j ='\n';
    int count = 0;
    FILE *fp_argv = fopen("来了老弟.txt","r");
    for (int i = 0; EOF !=(ch=fgetc(fp_argv)); i++)
    {
        if( ch == j)
        {
           count++;
        }
    }
    printf("这个文件有%d行\n", count);
    return 0;
}